#coding=utf-8

from robot.libraries.BuiltIn import BuiltIn
from .initLib import initlib
class commonUtils(initlib):
    def __init__(self):
        self.builtin = BuiltIn()
    def presskey(self,element,*keystr):
        element.send_keys(*keystr)
        
    def clickMenuIntoPage(self,locator,*menulist):
        tmpstr = "/div/ul/li/div"
        for menustr in menulist:
            locator += tmpstr
            locat_laststr = locator + "/a[descendant::strong[text()='"+ menustr +"']]"
            print(locat_laststr)
            self.alllib.click_element_rf(locat_laststr)